package com.rong.action;

import java.util.List;

import com.opensymphony.xwork2.ActionSupport;
import com.rong.DAO.ZynCarDAO;
import com.rong.DAO.ZynCompanyDAO;
import com.rong.ORM.ZynCar;
import com.rong.ORM.ZynCompany;

public class ComCarEtcListAction extends ActionSupport {

	
		ZynCompany com=new ZynCompany();
		ZynCompanyDAO comDao=new ZynCompanyDAO();
		private List<ZynCompany> comlist;
		
		ZynCar car=new ZynCar();
		ZynCarDAO carDao=new ZynCarDAO();
		private List<ZynCar> carlist;
	
		
		
		/**
		 * @return the com
		 */
		public ZynCompany getCom() {
			return com;
		}



		/**
		 * @param com the com to set
		 */
		public void setCom(ZynCompany com) {
			this.com = com;
		}



		/**
		 * @return the comlist
		 */
		public List<ZynCompany> getComlist() {
			return comlist;
		}



		/**
		 * @param comlist the comlist to set
		 */
		public void setComlist(List<ZynCompany> comlist) {
			this.comlist = comlist;
		}



		/**
		 * @return the car
		 */
		public ZynCar getCar() {
			return car;
		}



		/**
		 * @param car the car to set
		 */
		public void setCar(ZynCar car) {
			this.car = car;
		}



		/**
		 * @return the carlist
		 */
		public List<ZynCar> getCarlist() {
			return carlist;
		}



		/**
		 * @param carlist the carlist to set
		 */
		public void setCarlist(List<ZynCar> carlist) {
			this.carlist = carlist;
		}



		@Override
	    public String execute() throws Exception {
			this.setCarlist(carDao.findAll());        //保存注册的user对象
			 this.setComlist(comDao.findAll());        //保存注册的user对象
	        return SUCCESS;
	    }
		 public String water() throws Exception {
				//this.setCarlist(carDao.findAll());        //保存注册的user对象
				 this.setComlist(comDao.findAll());        //保存注册的user对象
		        return "success_2";
		    }
		 public void getList() throws Exception {
				this.setCarlist(carDao.findAll());        //保存注册的user对象
				 this.setComlist(comDao.findAll());        //保存注册的user对象
		        
		    }
}
